package com.ghca.storm.performance;

import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.topology.TopologyBuilder;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.SigarException;

/**
 * Created by gh on 2016/10/24.
 */
public class CPUTopology {

    public static void main(String[] args) throws SigarException {
      /*  TopologyBuilder builder = new TopologyBuilder();
        builder.setSpout("spout_id", new CPUSpout());
        builder.setBolt("spit_bolt_id", new CPUBolt()).shuffleGrouping("spout_id");
        LocalCluster localCluster = new LocalCluster();
        Config config = new Config();
       // config.setMaxTaskParallelism(1);
        localCluster.submitTopology(CPUTopology.class.getSimpleName() + System.currentTimeMillis(),
                config, builder.createTopology());*/
        new Sigar().getCpuInfoList();
    }
}
